<?php
/**
 * Created by PhpStorm.
 * User: chenx
 * Date: 18-3-15
 * Time: 下午4:01
 */

namespace backend\controllers;

use common\models\Admin;
use common\service\ExcelService;

class ExportController extends BaseController
{
    public function actionDemo(){
        $data = Admin::find()->asArray()->all();

//        echo 1;exit;
        ExcelService::exportExcel($data,'1.xlsx');

    }


}